<?php
class login extends CI_Controller{
	
	function index(){
		$data['judul'] = "Halaman Masuk";
		$data['error'] = "";
		$this->load->view('login_v', $data);
	}
	
	function plogin(){
		$this->load->model('login_m');
		$passdb = $this->login_m->cek_login();
		if ($passdb == FALSE){
			$data['error'] = "Password yang anda masukkan salah, silahkan masukkan lagi";
			$this->load->view('login_v', $data);
		}
		else{
			$data['judul'] = "Home";
			$data['error'] = "Berhasil Login";
			$this->load->view('home', $data);
		}
	}
}
?>